<?php
	/*
	* GMapFP Component Google Map for Joomla! 1.6.x
	* Version 9.0.beat1
	* Creation date: Mai 2011
	* Author: Fabrice4821 - www.gmapfp.org
	* Author email: webmaster@gmapfp.org
	* License GNU/GPL
	*/

defined('_JEXEC') or die('Restricted access');

class TableGMapFP extends JTable
{
	/** @var int Primary key */
	var $id					= 0;
	var $nom				= '';
	var $alias				= '';
	var $adresse	  		= '';
	var $adresse2	  		= '';
	var $ville				= '';
	var $departement		= '';
	var $codepostal			= '';
	var $pay		  		= '';
	var $tel		  		= '';
	var $tel2		  		= '';
	var $fax		  		= '';
	var $email		  		= '';
	var $web		  		= '';
	var $img		  		= '';
	var $album		  		= 0;
	var $intro				= '';
	var $message			= '';
	var $horaires_prix		= '';
	var $link				= '';
	var $icon				= '';
	var $icon_label			= '';
	var $article_id			= '';
	var $affichage			= '';
	var $marqueur			= '';
	var $glng				= '';
	var $glat				= '';
	var $gzoom				= '';
	var $catid				= '';
	var $userid				= '';
	var $published			= 0;
	var $checked_out		= 0;
	var $metadesc			= '';
	var $metakey			= '';
	var $ordering			= null;

	/**
	 * Constructor
	 *
	 * @param object Database connector object
	 */
	function TableGMapFP(& $db) {
		parent::__construct('#__gmapfp', 'id', $db);
	}

	function check()
	{
		//Remove all HTML tags from the title
		$filter = new JFilterInput(array(), array(), 0, 0);
		$this->nom = $filter->clean($this->nom);

		if(empty($this->alias)) {
			$this->alias = $this->nom;
		}
		$this->alias = JFilterOutput::stringURLSafe($this->alias);
		if(trim(str_replace('-','',$this->alias)) == '') {
			$datenow =& JFactory::getDate();
			$this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
		}

		return true;
	}
}
?>
